public class set4_1{
    public static void main (String args[]) {
        int i=1;
        int j=1;
	int sum=0;
        for(;i<=10;i++){
          j=j*i;
          sum=sum+j;
        }
     System.out.println("1~10的阶乘和为"+sum);
    }
}
